package com.taa.feign;

import com.taa.response.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: taa
 * @Desc:
 * @Create: 2025-06-22 19:18
 **/
@FeignClient(name = "elm-order-service") // 指向订单服务
public interface OrderFeignClient {

    /**
     * 调用订单服务，更新订单状态
     * @param orderNo 订单号
     * @param status 订单新状态 (1: 已支付)
     * @return 标准响应
     */
    @PostMapping("/order/status/update")
    Response<Void> updateOrderStatus(@RequestParam("orderNo") String orderNo,
                                     @RequestParam("status") Integer status);
}

